/* GUI CONVERTED from ecrevchk.i (converter v1.75) Mon Aug 14 12:28:16 2000 */
/* ecrevchk.i - ECN REVISION NUMBER CHECK                               */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*F0PN*/ /*V8:ConvertMode=Maintenance                                   */
/*K1Q4*/ /*V8:WebEnabled=No                                             */
/* REVISION: 7.4      LAST MODIFIED: 02/20/96   BY: rvw *H0JT*          */
/* REVISION: 8.6      LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan   */
/* REVISION: 9.1      LAST MODIFIED: 08/14/00   BY: *N0KW* Jacolyn Neder */


         rev-type = "C".


         if rev-char <> "" then do i = 1 to length(rev-char) by 1:
           /* NUMBERS OR - or . ALLOWED IN FIRST OR LAST POSITION OF FIELD  */
           if i = 1 or i = length(rev-char) then do:
             if (index("1234567890.-",substring(rev-char,i,1)) = 0)
             then leave.
           end.   /* END 1ST/LAST CHAR CHECK  */
           else do:
           /* NUMBERS OR . ALLOWED IN OTHER POSITIONS                       */
             if (index("1234567890.",substring(rev-char,i,1)) = 0)
             then leave.
           end.   /* END OTHER CHAR CHECK  */

           /* "." CAN NOT BE ENTERED TWICE */
           if (substring(rev-char,i,1) = "." and
           i < length(rev-char) and
           index(substring(rev-char,i + 1,
           length(rev-char) - i), ".") > 0)
           then leave.

           if i = length(rev-char) then do:
              /* "-" CAN NOT BE ENTERED TWICE */
              if (substring(rev-char,1,1) = "-" and
              substring(rev-char,i,1) = "-")
              then leave.

              /* ALL POSITIONS CHECKED ARE VALID NUMERIC DATA     */
              rev-type = "D".

           end.   /* END i = LENGTH..    */

         end.  /* END DO WHILE  */
